package com.api.tiny.mirror.service.product.response;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import com.tiny.mirror.service.product.enums.AppStatusEnum;
import com.tiny.mirror.service.product.enums.AppTypeEnum;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import lombok.Getter;
import lombok.Setter;

/**
 * @Author: liujsh
 * @Description:
 * @Date: Create in 2023/10/7
 */
@Getter
@Setter
public class AppVO {

  @JsonProperty(value = "id")
  private Long id;
  @JsonProperty(value = "name")
  private String name;
  @JsonProperty(value = "price")
  private BigDecimal price;
  @JsonProperty(value = "user_number")
  private Long userNumber;
  @JsonProperty(value = "preview_image")
  private String previewImage;
  @JsonProperty(value = "role_perms")
  private String rolePerms;
  @JsonProperty(value = "platform_num")
  private Long platformNum;
  @JsonProperty(value = "type")
  private AppTypeEnum type;
  @JsonProperty(value = "status")
  private AppStatusEnum status;
  @JsonProperty(value = "order_num")
  private Integer orderNum;
  @JsonProperty(value = "create_time")
  @JsonSerialize(using = LocalDateTimeSerializer.class)
  @JsonDeserialize(using = LocalDateTimeDeserializer.class)
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private LocalDateTime createTime;
  @JsonProperty(value = "update_time")
  @JsonSerialize(using = LocalDateTimeSerializer.class)
  @JsonDeserialize(using = LocalDateTimeDeserializer.class)
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private LocalDateTime updateTime;
}
